home *** CD-ROM | disk | FTP | other *** search
- MYSQLDUMP(1) MYSQLDUMP(1)
-
-
-
- NNAAMMEE
- mysqldump - text-based client for dumping or backing up
- mysql databases, tables and or data.
-
- UUSSAAGGEE
- mmyyssqqlldduummpp [[_O_P_T_I_O_N_S] database [_t_a_b_l_e_s_]
-
- OR mmyyssqqlldduummpp [[_O_P_T_I_O_N_S] --databases [_O_P_T_I_O_N_S_] _D_B_1 _[_D_B_2
- _D_B_3_._._._]
-
- OR mmyyssqqlldduummpp [[_O_P_T_I_O_N_S] --all-databases [_O_P_T_I_O_N_S_]
-
- OOPPTTIIOONN SSYYNNOOPPSSIISS
- mmyyssqqlldduummpp [--AA|----aallll--ddaattaabbaasseess] [--aa|----aallll] [--##|----ddeebbuugg==......]
- [----cchhaarraacctteerr--sseettss--ddiirr==......]] [--??|----hheellpp] [--BB|----ddaattaabbaasseess]
- [--cc|----ccoommpplleettee--iinnsseerrtt] [--CC|----ccoommpprreessss] [----ddeeffaauulltt--cchhaarraacc
- tteerr--sseett==......]] [--ee|----eexxtteennddeedd--iinnsseerrtt] [----aadddd--ddrroopp--ttaabbllee]
- [----aadddd--lloocckkss] [----aallllooww--kkeeyywwoorrddss] [----ddeellaayyeedd--iinnsseerrtt]
- [--FF|----fflluusshh--llooggss] [--ff|----ffoorrccee] [--hh|----hhoosstt==......]
- [--ll|----lloocckk--ttaabblleess] [--nn|----nnoo--ccrreeaattee--ddbb] [--tt|----nnoo--ccrreeaattee--
- iinnffoo] [--dd|----nnoo--ddaattaa] [--OO|----sseett--vvaarriiaabblleevar=_o_p_t_i_o_n]] [----oopptt]
- [--pp|----ppaasssswwoorrdd_[_=_._._._]] [--PP|----ppoorrtt==......] [--qq|----qquuiicckk]
- [--QQ|----qquuoottee--nnaammeess] [--SS|----ssoocckkeett==......] [----ttaabblleess]
- [--TT|----ttaabb==......] [--uu|----uusseerr==##] [--vv|----vveerrbboossee] [--VV|----vveerr
- ssiioonn] [--ww|----wwhheerree==] [----ddeellaayyeedd] [--ee|----eexxtteennddeedd--iinnsseerrtt]
- [----ffiieellddss--tteerrmmiinnaatteedd--bbyy==......] [----ffiieellddss--eenncclloosseedd--bbyy==......]
- [----ffiieellddss--ooppttiioonnaallllyy--eenncclloosseedd--bbyy==......]
- [----ffiieellddss--eessccaappeedd--bbyy==......] [----lliinneess--tteerrmmiinnaatteedd--bbyy==......]
- [--vv|----vveerrbboossee] [--VV|----vveerrssiioonn] [--OO nneett__bbuuffffeerr__lleennggtthh==##,,
- wwhheerree ## << 1166MM]
-
- DDEESSCCRRIIPPTTIIOONN
- Dumping definition and data mysql database or table _m_y_s_q_l_
- _d_u_m_p supports by executing
-
- --AA|----aallll--ddaattaabbaasseess
- Dump all the databases. This will be same as
- ----ddaattaabbaasseess with all databases selected.
-
- --aa|----aallll
- Include all MySQL specific create options.
-
- --##|----ddeebbuugg==......
- Output debug log. Often this is 'd:t:o,filename`.
-
- ----cchhaarraacctteerr--sseettss--ddiirr==......
- Directory where character sets are
-
- --??|----hheellpp
- Display this help message and exit.
-
- --BB|----ddaattaabbaasseess
- To dump several databases. Note the difference in
- usage; In this case no tables are given. All name
- arguments are regarded as databasenames.
-
- --cc|----ccoommpplleettee--iinnsseerrtt
- Use complete insert statements.
-
- --CC|----ccoommpprreessss
- Use compression in server/client protocol.
-
- ----ddeeffaauulltt--cchhaarraacctteerr--sseett==......
- Set the default character set
-
- --ee|----eexxtteennddeedd--iinnsseerrtt
- Allows utilization of the new, much faster INSERT
- syntax.
-
- ----aadddd--ddrroopp--ttaabbllee
- Add a 'drop table' before each create.
-
- ----aadddd--lloocckkss
- Add locks around insert statements.
-
- ----aallllooww--kkeeyywwoorrddss
- Allow creation of column names that are keywords.
-
- ----ddeellaayyeedd--iinnsseerrtt
- Insert rows with INSERT DELAYED.
-
- --FF|----fflluusshh--llooggss
- Flush logs file in server before starting dump.
-
- --ff|----ffoorrccee
- Continue even if we get an sql-error.
-
- --hh|----hhoosstt==......
- Connect to host.
-
- --ll|----lloocckk--ttaabblleess
- Lock all tables for read.
-
- --nn|----nnoo--ccrreeaattee--ddbb
- will not be put in the output. The above line will
- be added otherwise, if ----ddaattaabbaasseess or
- ----aallll--ddaattaabbaasseess option was given.
-
- --tt|----nnoo--ccrreeaattee--iinnffoo
- Don't write table creation info.
-
- --dd|----nnoo--ddaattaa
- No row information.
-
- --OO|----sseett--vvaarriiaabbllee vvaarr==ooppttiioonn
- give a variable a value. ----hheellpp lists variables
-
- ----oopptt Same as ----aadddd--ddrroopp--ttaabbllee ----aadddd--lloocckkss ----aallll
- ----eexxtteennddeedd--iinnsseerrtt ----qquuiicckk ----lloocckk--ttaabblleess
-
- --pp|----ppaasssswwoorrdd[[==......]]
- Password to use when connecting to server. If
- password is not given it's solicited on the tty.
-
- --PP|----ppoorrtt==......
- Port number to use for connection.
-
- --qq|----qquuiicckk
- Don't buffer query, dump directly to stdout.
-
- --QQ|----qquuoottee--nnaammeess
- Quote table and column names with `
-
- --SS|----ssoocckkeett==......
- Socket file to use for connection.
-
- ----ttaabblleess
- _O_v_e_r_r_i_d_e_s option ----ddaattaabbaasseess(-B).
-
- --TT|----ttaabb==......
- Creates tab separated textfile for each table to
- given path. (creates .sql and .txt files). NOTE:
- This only works if mysqldump is run on the same
- machine as the mysqld daemon.
-
- --uu|----uusseerr==##
- User for login if not current user.
-
- --vv|----vveerrbboossee
- Print info about the various stages.
-
- --VV|----vveerrssiioonn
- Output version information and exit.
-
- --ww|----wwhheerree==
- dump only selected records; QUOTES mandatory!
-
- ----ddeellaayyeedd
- Insert rows with the INSERT DELAYED command.
-
- --ee|----eexxtteennddeedd--iinnsseerrtt
- Use the new multiline INSERT syntax. (Gives more
- compact and faster inserts statements.)
-
- ----ffiieellddss--tteerrmmiinnaatteedd--bbyy==......
-
- ----ffiieellddss--eenncclloosseedd--bbyy==......
-
-
- ----ffiieellddss--ooppttiioonnaallllyy--eenncclloosseedd--bbyy==......
-
- ----ffiieellddss--eessccaappeedd--bbyy==......
-
- ----lliinneess--tteerrmmiinnaatteedd--bbyy==......
- These options are used with the --TT option
- and have the same meaning as the correspond
- ing clauses for LOAD DATA INFILE. See Mysql
- manual section 7.23 LOAD DATA INFILE Syntax.
-
- --vv|----vveerrbboossee
- Verbose mode. Print out more information on
- what the program does.
-
- --VV|----vveerrssiioonn
- Print version information and exit.
-
- --OO nneett__bbuuffffeerr__lleennggtthh==##,, wwhheerree ## << 1166MM
- When creating multi-row-insert statements
- (as with option ----eexxtteennddeedd--iinnsseerrtt or ----oopptt
- ), mysqldump will create rows up to
- net_buffer_length length. If you increase
- this variable, you should also ensure that
- the max_allowed_packet variable in the MySQL
- server is bigger than the net_buffer_length.
-
- EEXXAAMMPPLLEESS
- The most normal use of mysqldump is probably for
- making a backup of whole databases. See Mysql Man
- ual section 21.2 Database Backups.
-
- mysqldump --opt _d_a_t_a_b_a_s_e > backup-file.sql
-
- You can read this back into MySQL with:
-
- mmyyssqqll _d_a_t_a_b_a_s_e << backup-file.sql
-
- or
-
- mmyyssqqll -e 'source /patch-to-backup/backup-file.sql'
- database
-
- However, it's also very useful to populate another
- MySQL server with information from a database:
-
- mysqldump --opt _d_a_t_a_b_a_s_e | mysql --host=_r_e_m_o_t_e_-_h_o_s_t
- _-_C _d_a_t_a_b_a_s_e
-
- It is possible to dump several databases with one
- command:
-
- mysqldump --databases database1 [ database2
- database3... ] > my_databases.sql
-
- If all the databases are wanted, one can use:
-
- mysqldump _-_-_a_l_l_-_d_a_t_a_b_a_s_e_s > all_databases.sql
-
-
- SSEEEE AALLSSOO
- isamchk (1), isamlog (1), mysqlaccess (1), mysqlad
- min (1), mysqlbug (1), mysqld (1), mysqldump (1),
- mysqlshow (1), msql2mysql (1), perror (1), replace
- (1), safe_mysqld (1), which1 (1), zap (1),
-
- AAUUTTHHOORR
- Ver 1.0, distribution 3.23.29a Michael (Monty)
- Widenius (monty@tcx.se), TCX Datakonsult AB
- (http://www.tcx.se). This software comes with no
- warranty. Manual page by L. (Kill-9) Pedersen
- (kill-9@kill-9.dk), Mercurmedia Data Model Archi
- tect / system developer (http://www.mercurme
- dia.com)
-
-
-
-
- 19 December 2000 MYSQLDUMP(1)
-